package com.xinyu.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author XinYu
 * @since 2025-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_task_state_history")
@ApiModel(value="TaskStateHistory对象", description="")
public class TaskStateHistory implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "任务id")
    private Integer taskId;

    @ApiModelProperty(value = "状态")
    private Integer state;

    @ApiModelProperty(value = "理由")
    private String stateReason;

    @ApiModelProperty(value = "用户")
    private Integer userId;

    @ApiModelProperty(value = "时间")
    private String createdTime;

    @TableField(exist = false)
    private User user;

    public TaskStateHistory(Integer taskId, Integer state, String stateReason, Integer userId, String createdTime) {
        this.taskId = taskId;
        this.state = state;
        this.stateReason = stateReason;
        this.userId = userId;
        this.createdTime = createdTime;
    }

    public TaskStateHistory() {
    }
}
